import createStore from '../../store'

export default () => async (ctx, next) => {
    // ctx.state.store = createStore({ count: 0})
    ctx.state.store = await createStore({})
    // console.info(ctx.state.state);
    await next()
    ctx.state.state = await ctx.state.store.getState()
}
